using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.ProductionManage.Dtos
{
    /// <summary>
    /// 更新生产工单输入DTO
    /// </summary>
    public class UpdateWorkOrderDto
    {
        /// <summary>
        /// 工单名称
        /// </summary>
        [Required(ErrorMessage = "工单名称不能为空")]
        public string OrderName { get; set; }

        /// <summary>
        /// 来源类型（生产/委外/返修等）
        /// </summary>
        public string SourceType { get; set; }

        /// <summary>
        /// 单据状态（未开始/进行中/已完成/已取消）
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        [Required(ErrorMessage = "产品编号不能为空")]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [Required(ErrorMessage = "产品名称不能为空")]
        public string ProductName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string Specification { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 工单数量
        /// </summary>
        [Required(ErrorMessage = "工单数量不能为空")]
        [Range(1, int.MaxValue, ErrorMessage = "工单数量必须大于0")]
        public int Quantity { get; set; }

        /// <summary>
        /// 需求日期
        /// </summary>
        public DateTime RequiredDate { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNumber { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        public string Remarks { get; set; }
    }
} 